<?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

class mlogin extends CI_Model {

	function __construct() {
		parent::__construct();
	}
	
	function login($user){
		$sql = "
			SELECT *
			FROM tbl_user
			WHERE username = ".$this->db->escape($user)."
		";
		$hasil = $this->db->query($sql)->result_array();
		
		if(count($hasil) > 0){
			return $hasil[0];
		}else{
			return false;
		}
	}
	
	function changePass($userId, $newPass){
		//$sql = "UPDATE users SET USER_PASS = '$newPass' WHERE USER_ID = '$userId'";
		
		//$this->db->query($sql);
	}
}	

// end of file mhome.php